package com.ku.kill.service.model;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @program: kill2
 * @description: 业务模型
 * @author: JokerKu
 * @create: 2020-04-02 15:26
 **/

@Data
public class UserModel {

    private Integer id;
    @NotBlank(message = "用户名不能为空") //""和null都不允许
    private String name;
    @NotNull(message = "姓名不能不填写") //不允许null
    private Byte gender;
    @NotNull(message = "年龄不能不填写")
    @Min(value = 0,message = "年龄必须大于0岁")
    @Max(value = 150,message = "年龄必要小于150岁")
    private Integer age;
    @NotBlank(message = "手机号不能为空")
    private String telphone;
    private String registerMode;
    private String thirdPartyId;
    @NotBlank(message = "密码不能为空")
    private String encrptPasswprd;


}
